<%'  ------------------------------------------------------------
  '  JScriptFix.asp 
  '  ------------------------------------------------------------
  '  VCS INFO:
  '  
  '  $Revision:   1.1  $
  '  $Date:   05 May 1998 14:17:38  $
  '  $Author:   shsieh  $
  '  $Workfile:   jscriptfix.asp  $
  '  ------------------------------------------------------------
  '  All Rights Reserved.  Copyright (c) 1988-1998 FileNET Corp.
  '  ------------------------------------------------------------
  '%>

<%
'Note: This is a temporary fix to workaround IE4 problem of treating JavaScript
'      within an anchor tag's href as insecured.
'      According to Microsoft, the problem has being fixed for the upcoming version/update
'      of IE4 and Windows 98.

'Detecting if the browser is an IE4 browser
IE40Browser = InStr(Request.ServerVariables("HTTP_USER_AGENT"), "MSIE 4")
if IE40Browser then
%>

<script language=javascript>
<!--
function OnClickHandler()
{
	var el=null;
	var flag=true;
	el = event.srcElement;
	// do the while loop to find out if any of the parent elements
	// is a A HREF
	// This is necessary because in IE4, you can receive events of any element
	// including the <B> tag
	while (flag && el)
	{
		if (el.tagName == "A") 
		{
			flag=false;
			if (el.protocol == "javascript:")
			{
				execScript(el.href, "javascript");
				// we do a window.event.returnValue=false so that the default
				// action does not happen - which in case of a href will be 
				// navigating to a link
				window.event.returnValue = false;
			}
			if (el.protocol == "vbscript:")
			{
				execScript(el.pathname, "vbscript");
				window.event.returnValue = false;
			}
						
		}
		else
			el = el.parentElement;
	}
}

// Hook up the document's onClick event
document.onclick = OnClickHandler;
//-->
</script>

<%
end if
%>